package com.youi.entity;

import java.util.Date;

import com.youi.common.DelStatus;

import java.io.Serializable;


/**
 * 退款订单
 * @author XJY
 */
public class Refundorder implements Serializable {

	private Long id;							//ID
	private Date gmtCreated;					//创建时间
	private Integer delStatus;					//删除状态（0否 1是）
	private Date gmtModify;					    //最后修改时间
	private Long userId;					    //用户id
	private Long merchantId;				    //商家id
	private Integer orderType;					//退款订单类型(0直接退款 1售后退款)
	private Integer status;					    //退款状态(-2退款失败-1未收货 0退款中 1退款成功)
	private Integer applyStatus;				//审核状态(-1不通过 0未审核 1通过 2关闭订单)
	private Integer takeStatus;					//退货状态(-1未收货 0已收货 1 不退货)
	private Integer type;					    //退款类型(0易宝退款)
	private Integer refundMethods;			    //退款方式(0整单退)
	private String refundOrderNo;			    //退款单号
	private String orderNo;					    //原订单号
	private String merchantName;			    //商家名称
	private String merchantCode;			    //商家代码
	private String phone;					    //退货人手机号码
	private Date gmtApply;					    //审核时间
	private String refuseReason;			    //不通过原因
	private Double payAmount;					//付款金额
	private Double refundAmount;				//退款金额
	
	private String goodsName;					//商品名称
	private String goodsCode;					//商品编码
	private Integer goodsCount;					//商品数量
	private Orderaftersale orderaftersale;		//订单售后信息
    public Refundorder(){

    }

    public Refundorder(Long id,Date gmtCreated,Integer delStatus,Date gmtModify) {
       this.id=id;
       this.gmtCreated=gmtCreated;
       this.delStatus=delStatus;
       this.gmtModify=gmtModify;
    }

    public Refundorder(User user,String refundOrderNo,Userorder userorder) {       
        this.gmtCreated=new Date();
        this.delStatus=DelStatus.NODEL;
        this.gmtModify=gmtCreated;
        this.userId=user.getId();
        this.merchantId=userorder.getMerchantId();
        this.status=-1;
        this.applyStatus=0;
        this.takeStatus=-1;
        this.type=0;
        this.refundMethods=0;
        this.refundOrderNo=refundOrderNo;
        this.orderNo=userorder.getOrderNo();
        this.merchantName=userorder.getMerchantName();
        this.merchantCode=userorder.getMerchantCode();
        this.phone=user.getPhone();
        this.payAmount=userorder.getPayableAmount();
     }

    public Refundorder(User user,Integer orderType,String refundOrderNo,Userorder userorder) {       
        this.gmtCreated=new Date();
        this.delStatus=DelStatus.NODEL;
        this.gmtModify=gmtCreated;
        this.userId=user.getId();
        this.merchantId=userorder.getMerchantId();
        this.orderType=orderType;
        this.status=-1;
        this.applyStatus=0;
        this.takeStatus=-1;
        this.type=0;
        this.refundMethods=0;
        this.refundOrderNo=refundOrderNo;
        this.orderNo=userorder.getOrderNo();
        this.merchantName=userorder.getMerchantName();
        this.merchantCode=userorder.getMerchantCode();
        this.phone=user.getPhone();
        this.payAmount=userorder.getPayableAmount();
     }


	public void setId(Long id){
		this.id=id;
	}

	public Long getId(){
		return id;
	}

	public void setGmtCreated(Date gmtCreated){
		this.gmtCreated=gmtCreated;
	}

	public Date getGmtCreated(){
		return gmtCreated;
	}

	public void setDelStatus(Integer delStatus){
		this.delStatus=delStatus;
	}

	public Integer getDelStatus(){
		return delStatus;
	}

	public void setGmtModify(Date gmtModify){
		this.gmtModify=gmtModify;
	}

	public Date getGmtModify(){
		return gmtModify;
	}

	public void setUserId(Long userId){
		this.userId=userId;
	}

	public Long getUserId(){
		return userId;
	}

	public void setMerchantId(Long merchantId){
		this.merchantId=merchantId;
	}

	public Long getMerchantId(){
		return merchantId;
	}

	public void setStatus(Integer status){
		this.status=status;
	}

	public Integer getStatus(){
		return status;
	}

	public void setApplyStatus(Integer applyStatus){
		this.applyStatus=applyStatus;
	}

	public Integer getApplyStatus(){
		return applyStatus;
	}

	public void setTakeStatus(Integer takeStatus){
		this.takeStatus=takeStatus;
	}

	public Integer getTakeStatus(){
		return takeStatus;
	}

	public void setType(Integer type){
		this.type=type;
	}

	public Integer getType(){
		return type;
	}

	public void setRefundMethods(Integer refundMethods){
		this.refundMethods=refundMethods;
	}

	public Integer getRefundMethods(){
		return refundMethods;
	}

	public void setRefundOrderNo(String refundOrderNo){
		this.refundOrderNo=refundOrderNo;
	}

	public String getRefundOrderNo(){
		return refundOrderNo;
	}

	public void setOrderNo(String orderNo){
		this.orderNo=orderNo;
	}

	public String getOrderNo(){
		return orderNo;
	}

	public void setMerchantName(String merchantName){
		this.merchantName=merchantName;
	}

	public String getMerchantName(){
		return merchantName;
	}

	public void setMerchantCode(String merchantCode){
		this.merchantCode=merchantCode;
	}

	public String getMerchantCode(){
		return merchantCode;
	}

	public void setPhone(String phone){
		this.phone=phone;
	}

	public String getPhone(){
		return phone;
	}

	public void setGmtApply(Date gmtApply){
		this.gmtApply=gmtApply;
	}

	public Date getGmtApply(){
		return gmtApply;
	}

	public void setRefuseReason(String refuseReason){
		this.refuseReason=refuseReason;
	}

	public String getRefuseReason(){
		return refuseReason;
	}

	public Double getPayAmount() {
		return payAmount;
	}

	public void setPayAmount(Double payAmount) {
		this.payAmount = payAmount;
	}

	public Double getRefundAmount() {
		return refundAmount;
	}

	public void setRefundAmount(Double refundAmount) {
		this.refundAmount = refundAmount;
	}

	public String getGoodsName() {
		return goodsName;
	}

	public void setGoodsName(String goodsName) {
		this.goodsName = goodsName;
	}

	public String getGoodsCode() {
		return goodsCode;
	}

	public void setGoodsCode(String goodsCode) {
		this.goodsCode = goodsCode;
	}

	public Integer getGoodsCount() {
		return goodsCount;
	}

	public void setGoodsCount(Integer goodsCount) {
		this.goodsCount = goodsCount;
	}

	public Orderaftersale getOrderaftersale() {
		return orderaftersale;
	}

	public void setOrderaftersale(Orderaftersale orderaftersale) {
		this.orderaftersale = orderaftersale;
	}

	public Integer getOrderType() {
		return orderType;
	}

	public void setOrderType(Integer orderType) {
		this.orderType = orderType;
	}

}
